<!DOCTYPE HTML>
<html>
<head>
    {include file="common:meta"}
</head>
<body>
<div class="page-container">
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>用户ID</th>
                    <th>用户昵称</th>
                    <th>手机号</th>
                    <th>粉丝数</th>
                    <th>关注数</th>
                    <th>总充值RMB</th>
                    <th>上次登录时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="data" id="list" key="k"}
                <tr>
                    <td>{$k}</td>
                    <td>{$list.u_id}</td>
                    <td>{$list.nickname}</td>
                    <td>{$list.u_phone}</td>
                    <td>{$list.follow_num}</td>
                    <td>{$list.fans_num}</td>
                    <td>{$list.recharge_money}</td>
                    <td>{$list.last_login}</td>
                    <td>
                        <button type="button"  class="userInfo btn btn-info  btn-sm" style="margin-right:15px;" userId="{$list.id}">查看用户信息</button>
                        {if $list.recharge_money > 0}
                        <button type="button"  class="rechargeInfo btn btn-success  btn-sm" style="margin-right:15px;" userId="{$list.id}">查看充值记录</button>
                        {/if}
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            {$data|raw}
        </div>
    </div>
</div>
{include file="common:footer"}
<script>
    //查看用户信息
    $('.userInfo').click(function(){
        layer.open({
            type: 2,
            title: ['用户信息','font-size:18px;font-family:楷体;font-weight:700;'],
            shadeClose: true,
            shade: false,
            maxmin: true, //开启最大化最小化按钮
            area: ['900px', '600px'],
            content:"/UserInfo?user_id=" + $(this).attr('userId'),
            offset:'auto',
            scrollbar:false
        });
    });
    //查看用户充值记录
    $('.rechargeInfo').click(function(){
        layer.open({
            type: 2,
            title: ['用户充值记录','font-size:18px;font-family:楷体;font-weight:700;'],
            shadeClose: true,
            shade: false,
            maxmin: true, //开启最大化最小化按钮
            area: ['900px', '600px'],
            content:"/RechargeInfo?user_id=" + $(this).attr('userId'),
            offset:'auto',
            scrollbar:false
        });
    });
</script>
</body>
</html>